<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('整改复核')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-maintainence-edit" th:object="${tDrainagePipeMaintainence}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">清单状态：</label>
            <div class="col-sm-8">
                <select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_pipe_status')}" readonly>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{status}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">问题来源：</label>
            <div class="col-sm-8">
                <input name="problemSources" th:field="*{problemSources}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">上报时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="reportTime"
                           th:value="${#dates.format(tDrainagePipeMaintainence.reportTime, 'yyyy-MM-dd HH:mm')}"
                           class="form-control" placeholder="yyyy-MM-dd HH:mm" type="text" >
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">联系人：</label>
            <div class="col-sm-8">
                <input name="contact" th:field="*{contact}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">联系电话：</label>
            <div class="col-sm-8">
                <input name="telephone" th:field="*{telephone}" class="form-control" type="text"
                       data-mask="9999-9999999" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">大类：</label>
            <div class="col-sm-8">
                <input name="bigClassName" th:field="*{bigClassName}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">小类：</label>
            <div class="col-sm-8">
                <input name="smallClassName" th:field="*{smallClassName}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">关联办件号：</label>
            <div class="col-sm-8">
                <input name="associatedOfficeNum" th:field="*{associatedOfficeNum}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">问题描述：</label>
            <div class="col-sm-8">
                <input name="problemDescription" th:field="*{problemDescription}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否疑难件：</label>
            <div class="col-sm-8">
                <select name="isDifficultParts" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{isDifficultParts}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">解决期限：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="solveDeadline"
                           th:value="${#dates.format(tDrainagePipeMaintainence.solveDeadline, 'yyyy-MM-dd HH:mm')}"
                           class="form-control" placeholder="yyyy-MM-dd HH:mm" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">到期时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="expirationTime"
                           th:value="${#dates.format(tDrainagePipeMaintainence.expirationTime, 'yyyy-MM-dd HH:mm')}"
                           class="form-control" placeholder="yyyy-MM-dd HH:mm" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">长度(m)：</label>
            <div class="col-sm-8">
                <input name="length" th:field="*{length}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">宽度(m)：</label>
            <div class="col-sm-8">
                <input name="width" th:field="*{width}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">面积(m^2)：</label>
            <div class="col-sm-8">
                <input name="area" th:field="*{area}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">所属辖区：</label>
            <div class="col-sm-8">
                <input name="memberArea" th:field="*{memberArea}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">问题地点：</label>
            <div class="col-sm-8">
                <input name="issuePalce" th:field="*{issuePalce}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">处理部门：</label>
            <div class="col-sm-8">
                <div class="input-group">
                    <input class="form-control" type="text" name="solveDepartment" onclick="selectDeptTree()"
                           id="treeName" th:field="*{solveDepartment}" required>
                    <span class="input-group-addon"><i class="fa fa-search"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input name="remark" th:field="*{remark}" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label" for="opinion">审批意见：</label>
            <div class="col-sm-8">
                <select name="opinion" id="opinion" class="form-control m-b">
                    <option value="true">同意</option>
                    <option value="false">拒绝</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">批注：</label>
            <div class="col-sm-8">
                <textarea name="comment" class="form-control"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "process/maintainence";
    $("#form-maintainence-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var taskId = [[${taskId}]];
            $.operate.save(prefix + "/complete/" + taskId, $('#form-maintainence-edit').serialize());
        }
    }
    $("input[name='reportTime']").datetimepicker({
        autoclose: true,
        startDate: new Date()
    });

    $("input[name='solveDeadline']").datetimepicker({
        autoclose: true,
        startDate: new Date()
    });

    $("input[name='expirationTime']").datetimepicker({
        autoclose: true,
        startDate: new Date()
    });

</script>
</body>
</html>